package com.hx.vending.dao;

import com.hx.vending.bean.Model;
import com.hx.vending.bean.OrderBuy;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2018/11/26.
 * 订单商品货道信息
 */
@Repository
public interface OrderBuyMapper {

    int deleteByPrimaryKey(Integer orderBuyId);

    int deleteByParentId(Integer orderBuyParentId);

    int insertSelective(OrderBuy record);

    OrderBuy selectByPrimaryKeySelective(OrderBuy record);

    List<OrderBuy> selectByExampleSelective(OrderBuy record);

    int updateByPrimaryKeySelective(OrderBuy record);

    Double selectMoneyFile(@Param("userId") Integer userId, @Param("fieldList") List<Integer> fieldList,
                           @Param("startTime") String startTime, @Param("endTime") String endTime);
    List<Map<String,Object>> selectRefundByFieldId(@Param("fieldList") List<Integer> fieldList,@Param("startTime") String startTime,
                                                   @Param("endTime") String endTime,@Param("userId")Integer userId);
    Double selectByEquipment(@Param("equipmentId")String equipmentId,@Param("userId")Integer userId,
                             @Param("startTime")String startTime, @Param("endTime")String endTime);
}
